package org.uim.cricket.entities;

import java.util.*;

import org.uim.cricket.entities.batting.BattingInning;
import org.uim.cricket.entities.bowling.BowlingInning;
import org.uim.cricket.entities.fielding.SingleFielding;

public class MatchPlayer {

	private Player player = null;
	private List<BattingInning> battingInnings = null;
	private List<BowlingInning> bowlingInnings = null;
	private List<SingleFielding> fieldingEfforts = null;
	
	public void addBattingInning(BattingInning binn) {
		if (this.battingInnings == null) this.battingInnings = new ArrayList<BattingInning>();
		
		this.battingInnings.add(binn);
	}
	
	public void addBowlingInning(BowlingInning bowlInn) {
		if (this.bowlingInnings == null) this.bowlingInnings = new ArrayList<BowlingInning>();
		
		this.bowlingInnings.add(bowlInn);
	}
	
	public void addFieldingEffort(SingleFielding fielding) {
		if (this.fieldingEfforts == null) this.fieldingEfforts = new ArrayList<SingleFielding>();
		
		this.fieldingEfforts.add(fielding);
	}
	
	public void setPlayer(Player player) {
		this.player = player;
	}
	
	public Player getPlayer() {
		return player;
	}
	
	public void setFieldingEfforts(List<SingleFielding> fieldingEfforts) {
		this.fieldingEfforts = fieldingEfforts;
	}
	
	public void setBowlingInnings(List<BowlingInning> bowlingInnings) {
		this.bowlingInnings = bowlingInnings;
	}
	
	public void setBattingInnings(List<BattingInning> battingInnings) {
		this.battingInnings = battingInnings;
	}
	
	public List<SingleFielding> getFieldingEfforts() {
		return fieldingEfforts;
	}
	
	public List<BowlingInning> getBowlingInnings() {
		return bowlingInnings;
	}
	
	public List<BattingInning> getBattingInnings() {
		return battingInnings;
	}
	
}
